package cn.tedu.csmall.server; 
 /*
 @Time: 2022/9/12 0:00
 @Author:GShuai
 @File:ScopeTestBean.class
 @Software:IntelliJ IDEA
*/
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
//@Scope("prototype")
//@Lazy
public class ScopeTestBean {
    public ScopeTestBean() {
        System.out.println("创建了ScopeTestBean对象……");
    }

    @PostConstruct
    public void init() {
        System.out.println("ScopeTestBean.init");
    }

    @PreDestroy
    public void destroy() {
        System.out.println("ScopeTestBean.destroy");
    }
}
